package com.bawei.rk_01.Adapter

import android.widget.TextView
import com.bawei.base.utils.bean.CouponsEntityItem
import com.bawei.rk_01.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class CouponsAdapter : BaseQuickAdapter<CouponsEntityItem,BaseViewHolder>(R.layout.item_coupons) {
    override fun convert(holder: BaseViewHolder, item: CouponsEntityItem) {
        holder.setText(R.id.coupons_sum,""+item.money)
        //判断是否已领取
        if (item.isUse){
            val textView = holder.getView<TextView>(R.id.lq)
            textView.text = "已\n领\n取"
        }else{
            val textView = holder.getView<TextView>(R.id.lq)
            textView.text = "领\n取"
        }
    }
}